<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var a = 9;

        function fn() {
            a = 0;
            return function (b) {
                return b + a++
            }
        }
        var f = fn()
        console.log(f(5)) //5
        console.log(fn()(5)) //5
        console.log(f(5)) //6
        console.log(a) // 2
    </script>
    <script>
        GO = {
            a: 9 => 0 =>1 => 0 => 1 => 2,
            fn: fn(),
            f: function (b) {
                return b + a++
            }
        }
        GO = {

        }
    </script>
</body>

</html>